package com.aier.user.entity;

import static javax.persistence.GenerationType.IDENTITY;

import java.sql.Timestamp;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import com.aier.common.common.Constant;

/**
 * 关注实体
 */
@SuppressWarnings("serial")
@Entity
@Table(name = "letter", catalog = "abc")
public class Letter implements java.io.Serializable {

    // 标识
    private Long lid;
    // 发信人用户id
    private Long suid;
    // 收信人用户id
    private Long ruid;
    // 类型（1正常私信（对话形式）2密友请求3密友请求通过4对关注的请求关注5通过请求关注）
    private Short type;
    // 内容
    private String content;
    // 是否已处理（0未处理(未读)1已处理(已读)）
    private Short state;
    // 图片
    private String img;
    // 发信人是否删除（1删除）
    private Short sdel;
    // 收信人是否删除（1删除）
    private Short rdel;
    // 时间
    private Timestamp cdate;
    
    // 发信人的昵称和头像
    private String nickname;
    private String headimg;


    /** default constructor */
    public Letter() {
    }

    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "lid", unique = true, nullable = false)
    public Long getLid() {
        return lid;
    }

    public void setLid(Long lid) {
        this.lid = lid;
    }
    @Column(name = "suid", nullable = false, length = Constant.num_20)
    public Long getSuid() {
        return suid;
    }

    public void setSuid(Long suid) {
        this.suid = suid;
    }
    @Column(name = "ruid", nullable = false, length = Constant.num_20)
    public Long getRuid() {
        return ruid;
    }

    public void setRuid(Long ruid) {
        this.ruid = ruid;
    }
    @Column(name = "type")
    public Short getType() {
        return type;
    }

    public void setType(Short type) {
        this.type = type;
    }
    @Column(name = "content")
    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }
    @Column(name = "state")
    public Short getState() {
        return state;
    }

    public void setState(Short state) {
        this.state = state;
    }
    @Column(name = "img")
    public String getImg() {
        return img;
    }

    public void setImg(String img) {
        this.img = img;
    }
    @Column(name = "cdate")
    public Timestamp getCdate() {
        return cdate;
    }

    public void setCdate(Timestamp cdate) {
        this.cdate = cdate;
    }

    public Short getSdel() {
        return sdel;
    }

    public void setSdel(Short sdel) {
        this.sdel = sdel;
    }

    public Short getRdel() {
        return rdel;
    }

    public void setRdel(Short rdel) {
        this.rdel = rdel;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getHeadimg() {
        return headimg;
    }

    public void setHeadimg(String headimg) {
        this.headimg = headimg;
    }

}